<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>MOVEM Instruction</title>
<link href="../edit68k.css" rel="stylesheet" type="text/css">
</head>

<body>
<h1 class="heading">MOVEM Instruction<BR></h1>
<hr noshade></h1>
          <BR>
          <span class="text">The instruction MOVEM (MOVE Multiple) makes it possible to fast transfer a group of registers to or from memory. The operation only works with words and longwords. When you move words to registers, the words are sign extended so all 32 bits are affected. The instruction is most often used to push registers onto the stack, so you can temporarily use those register for other purposes, and later restore the original values. Very useful in the beginning and the end of subroutines that
  change a lot of registers.<BR>
  <BR>
  ADDRESS METHODS: (An), -(An), x(An), x(An,xr.s), x.w, x.l<BR>
          <BR>
  ADDRESS METHODS: (An), (An)+, x(An), x(An,xr.s), x.w, x.l, x(PC), x(PC,xr.s)<BR>
          <BR>
  DATA LENGTH: Word, longword<BR>
  <BR>
FLAGS: Unaffected</span></P>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="55%">
  <TBODY>
    <TR>
      <TD width="22%" rowSpan=2 class="text">SYNTAX:</TD>
      <TD width="78%" class="text">MOVEM &lt;register list&gt;,&lt;ea&gt;</TD>
    </TR>
    <TR>
      <TD width="78%" class="text">MOVEM &lt;ea&gt;,&lt;register list&gt;</TD>
    </TR>
  </TBODY>
</TABLE>
<P><span class="text">The register list is a series of registers separated by a slash ("/"). You can also use one of many intervals (shown with a "-"). For example, D0-D5/A0-A2 means the registers D0, D1, D2, D3, D4, D5, A0, A1, A2.</span></P>
<P><span class="text">EXAMPLE CODE:</span></P>
<P class="sourcecode"><span class="text">&nbsp;&nbsp;&nbsp; MOVEM&nbsp;&nbsp;&nbsp; D0-D7/A1-A4,list&nbsp;&nbsp;&nbsp; moves all of the D resisters and 1 through 4 of the address resisters to memory</span></P>
</body>
</html>